//导入request.js请求工具
import request from '@/utils/request.js'
import { useTokenStore } from '@/stores/token.js';

export const finUser = (categoryData)=>{
    return request.post('/admin/finUser?currentPage='+categoryData.currentPage,categoryData)
}

export const delUser = (categoryData)=>{
    return request.post('/admin/deleteUser',categoryData)
}

export const addUser = (categoryData)=>{
    return request.post('/admin/addUser',categoryData)
}

export const updateUser = (categoryData)=>{
    return request.post('/admin/updateUser',categoryData)
}

export const finRepairtype = (categoryData)=>{
    return request.post('/admin/finRepairtype?currentPage='+categoryData.currentPage,categoryData)
}

export const delRepairtype = (categoryData)=>{
    return request.post('/admin/delRepairtype',categoryData)
}

export const addRepairtype = (categoryData)=>{
    return request.post('/admin/addRepairtype',categoryData)
}

export const updateRepairtype = (categoryData)=>{
    return request.post('/admin/updateRepairtype',categoryData)
}

export const fingonggao = (categoryData)=>{
    return request.post('/admin/fingonggao?currentPage='+categoryData.currentPage,categoryData)
}
export const addgonggao = (categoryData)=>{
    return request.post('/admin/addgonggao?currentPage='+categoryData.currentPage,categoryData)
}
export const updategonggao = (categoryData)=>{
    return request.post('/admin/updategonggao?currentPage='+categoryData.currentPage,categoryData)
}
export const delgonggao = (categoryData)=>{
    return request.post('/admin/deletegonggao?currentPage='+categoryData.currentPage,categoryData)
}

export const finOrder = (categoryData)=>{
    return request.post('/admin/finOrder?currentPage='+categoryData.currentPage,categoryData)
}

export const updateOrder = (categoryData)=>{
    return request.post('/admin/updateOrder?currentPage='+categoryData.currentPage,categoryData)
}

export const delOrder = (categoryData)=>{
    return request.post('/admin/delOrder?currentPage='+categoryData.currentPage,categoryData)
}

export const addOrder = (categoryData)=>{
    return request.post('/admin/addOrder?currentPage='+categoryData.currentPage,categoryData)
}

export const finReport = (categoryData)=>{
    return request.post('/admin/finReport?currentPage='+categoryData.currentPage,categoryData)
}
export const addReport = (categoryData)=>{
    return request.post('/admin/addReport?currentPage='+categoryData.currentPage,categoryData)
}
export const delReport = (categoryData)=>{
    return request.post('/admin/delReport?currentPage='+categoryData.currentPage,categoryData)
}
export const updateReport = (categoryData)=>{
    return request.post('/admin/updateReport?currentPage='+categoryData.currentPage,categoryData)
}

export const finMessageboard = (categoryData)=>{
    return request.post('/admin/finMessageboard?currentPage='+categoryData.currentPage,categoryData)
}
export const addMessageboard = (categoryData)=>{
    return request.post('/admin/addMessageboard?currentPage='+categoryData.currentPage,categoryData)
}
export const delMessageboard = (categoryData)=>{
    return request.post('/admin/delMessageboard?currentPage='+categoryData.currentPage,categoryData)
}
export const updateMessageboard = (categoryData)=>{
    return request.post('/admin/updateMessageboard?currentPage='+categoryData.currentPage,categoryData)
}

export const finUserData = (categoryData)=>{
    const tokenStore = useTokenStore();
    console.log(tokenStore.token);
    tokenStore.token;
    return request.post('/admin/finUserData',{headers:{'Authorization':tokenStore.token}})
}





